/**
 * 
 */
package com.demo2do.fms.scheduler.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Service;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.fms.entity.report.AppointmentStatus;
import com.demo2do.fms.scheduler.dao.fms.AppointmentDao;
import com.demo2do.fms.scheduler.entity.appointment.DriverCostAppointment;
import com.demo2do.fms.scheduler.entity.appointment.DriverMileageAppointment;
import com.demo2do.fms.scheduler.entity.appointment.TransportRevenueAppointment;
import com.demo2do.fms.scheduler.entity.appointment.VehicleMileageAppointment;
import com.demo2do.fms.scheduler.service.AppointmentReader;

/**
 * @author Ysy
 *
 */
@Service("appointmentReader")
public class AppointmentReaderImpl implements AppointmentReader {
	
	@Dao
	private AppointmentDao appointmentDao;
	
    /* (non-Javadoc)
     * @see com.demo2do.fms.scheduler.service.AppointmentReader#listVehicleMileage(com.demo2do.fms.entity.report.AppointmentStatus, java.lang.String)
     */
    public List<VehicleMileageAppointment> listVehicleMileage(AppointmentStatus status, String date) {
        return appointmentDao.listVehicleMileage(status.name(), date);
    }

    /* (non-Javadoc)
     * @see com.demo2do.fms.scheduler.service.AppointmentReader#listExpiredVehicleMileage(com.demo2do.fms.entity.report.AppointmentStatus, java.util.Date)
     */
    public List<VehicleMileageAppointment> listExpiredVehicleMileage(AppointmentStatus status, Date date) {
        return appointmentDao.listExpiredVehicleMileage(status.name(), date);
    }
    
    /* (non-Javadoc)
     * @see com.demo2do.fms.scheduler.service.AppointmentReader#listDriverMileage()
     */
    public List<DriverMileageAppointment> listDriverMileage(AppointmentStatus status, String date) {
        return appointmentDao.listDriverMileage(status.name(), date);
    }
    
    /* (non-Javadoc)
     * @see com.demo2do.fms.scheduler.service.AppointmentReader#listExpiredDriverMileage(com.demo2do.fms.entity.report.AppointmentStatus, java.util.Date)
     */
    public List<DriverMileageAppointment> listExpiredDriverMileage(AppointmentStatus status, Date date) {
        return null;
    }

    /* (non-Javadoc)
     * @see com.demo2do.fms.scheduler.service.AppointmentReader#listTransportRevenue()
     */
    public List<TransportRevenueAppointment> listTransportRevenue(AppointmentStatus status, String date) {
        return appointmentDao.listTransportRevenue(status.name(), date);
    }
    
    /* (non-Javadoc)
     * @see com.demo2do.fms.scheduler.service.AppointmentReader#listExpiredTransportRevenue(com.demo2do.fms.entity.report.AppointmentStatus, java.util.Date)
     */
    public List<TransportRevenueAppointment> listExpiredTransportRevenue(AppointmentStatus status, Date date) {
        return appointmentDao.listExpiredTransportRevenue(status.name(), date);
    }

    /* (non-Javadoc)
     * @see com.demo2do.fms.scheduler.service.AppointmentReader#listDriverCost()
     */
    public List<DriverCostAppointment> listDriverCost(AppointmentStatus status, String date) {
        return appointmentDao.listDriverCost(status.name(), date);
    }
    
    /* (non-Javadoc)
     * @see com.demo2do.fms.scheduler.service.AppointmentReader#listExpireDriverCost(com.demo2do.fms.entity.report.AppointmentStatus, java.util.Date)
     */
    public List<DriverCostAppointment> listExpireDriverCost(AppointmentStatus status, Date date) {
        return appointmentDao.listExpiredDriverCost(status.name(), date);
    }
    
}
